package cn.itcast.bos.service.base.impl;

import cn.itcast.bos.Dao.base.StandardDao;
import cn.itcast.bos.domain.base.Standard;
import cn.itcast.bos.service.base.StandardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class StandardServiceImpl implements StandardService {
    @Autowired
    private StandardDao standardDao;
    @Override
    public void save(Standard standard) {
        standardDao.save(standard);
    }

    @Override
    public Page<Standard> findPageData(PageRequest pageRequest) {
        return standardDao.findAll(pageRequest);
    }

    @Override
    public List<Standard> findAll() {
        return standardDao.findAll();
    }
}
